<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Admin Login</title>
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
      rel="stylesheet"
    />
  </head>
  <body class="d-flex align-items-center py-4 bg-light" style="height: 100vh">
    <main class="form-signin w-100 m-auto" style="max-width: 320px">
      <form method="post" action="/admin/login" class="card p-4 shadow-sm">
        <h1 class="h4 mb-3 fw-normal text-center">管理后台登录</h1>
        {% if error %}
        <div class="alert alert-danger py-1" role="alert">{{ error }}</div>
        {% endif %}
        <div class="form-floating mb-2">
          <input
            type="text"
            class="form-control"
            id="username"
            name="username"
            placeholder="njs"
            required
          />
          <label for="username">用户名</label>
        </div>
        <div class="form-floating mb-3">
          <input
            type="password"
            class="form-control"
            id="password"
            name="password"
            placeholder="Password"
            required
          />
          <label for="password">密码</label>
        </div>
        <button class="btn btn-primary w-100" type="submit">登录</button>
      </form>
    </main>
  </body>
</html>
